package de.uni_saarland.coli.doclists.index.filesystem;

/**
 * 
 * @author stefan
 * 
 *         Interface to convert object to a byte arrays. Needed for the
 *         DiscList.
 */
public interface IToBytes {
	/**
	 * Returns sets the index of the object in the disc list.
	 * 
	 * @param idx
	 *            an int with the index
	 */
	public void setListIDX(int idx);

	/**
	 * Returns the index of the object in the disc list.
	 * 
	 * @return the index
	 */
	public int getListIDX();

	/**
	 * Converts the objects to a byte array.
	 * 
	 * @return the object as byte array.
	 */
	public byte[] toBytes();
	
	/**
	 * Sets the disc list that stores these data.
	 * @param list the list.
	 */
	public void setDistList(DiscList list);
}
